package xiangmu.schoolpaper.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import xiangmu.schoolpaper.mapper.VerticalComparisonMapper;
import xiangmu.schoolpaper.pojo.DTO.HorizontalCompareStudentsDTO;
import xiangmu.schoolpaper.pojo.DTO.VertialComparisonDTO;
import xiangmu.schoolpaper.pojo.DTO.VerticalComparisonStudentIdDTO;
import xiangmu.schoolpaper.service.VerticalComprisonService;

import java.util.List;

@Service
public class VerticalComprisonServiceImpl implements VerticalComprisonService {
    @Autowired
    private VerticalComparisonMapper verticalComparisonMapper;


    @Override
    public List<VertialComparisonDTO> getAllStudentsByTeacher(Integer teacher) {
        List<VertialComparisonDTO> list = verticalComparisonMapper.getAllStudentsByTeacher(teacher);
        return list;
    }

    @Override
    public List<HorizontalCompareStudentsDTO> getAllPaperByStudent(String studentId) {
        List<HorizontalCompareStudentsDTO> list = verticalComparisonMapper.getAllPaperByStudent(studentId);
        return list;
    }

    @Override
    public List<Integer> getAllYearsByTeacher(Integer teacher) {
        List<Integer> list = verticalComparisonMapper.getAllYearsByTeacher(teacher);
        return list;
    }

    @Override
    public List<HorizontalCompareStudentsDTO> getAllPaperByTeacher(Integer teacher, Integer year) {
        List<HorizontalCompareStudentsDTO> list = verticalComparisonMapper.getAllPaperByTeacher(teacher,year);
        return list;
    }


}
